import {Name} from "./Name"
import { Company } from "./Company";
export class Application {
    name = new Name()
    description = new Name()
    company = new Company()

    constructor(name = new Name(), description = new Name(), company = new Company())
    {
        this.name = name
        this.description = description
        this.company = company
    }

    static isValid(obj){
        let valid = true

        valid &= obj.name != undefined
        valid &= obj.description != undefined
        valid &= obj.company != undefined

        if (valid){
            valid &= Name.isValid(obj.name)
            valid &= Name.isValid(obj.description)
            valid &= Company.isValid(obj.company)
        }

        return valid
    }
}